/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Map;

import Actor.TileObject;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Shape;

/**
 *
 * @author Eric-Standard
 */
public abstract class Tile {

    protected Shape[] shapes;
    protected boolean acts = false;
    public boolean hasObject = false;

    /**
     * Gets an array of Shapes indicating objects on this Tile.
     *
     * @return
     */
    public Shape[] getShapes(int x, int y) {
        return shapes;
    }

    /**
     * Called when the player takes an action on this Tile.
     */
    public void playerAction() {
    }

    /**
     * Draw this tile on a Graphics context.
     *
     * @param g The Graphics context.
     * @param x The x offset.
     * @param y The y offset.
     */
    public abstract void draw(Graphics g, int x, int y);

    /**
     * Called each step if acts is true. This method may not be called if the
     * tile is not in view.
     */
    public void act(long dt) {
    }

    /**
     * Gets the size of this tile.
     *
     * @return
     */
    public abstract Dimension getSize();

    /**
     * Gets the tile object on this tile, if there is one.
     *
     * @return
     */
    public TileObject getTileObject() {
        return null;
    }
}
